package com.g.ocache;

import java.math.BigDecimal;

/**
 * 
 * @author Jingqi Xu
 */
public interface CacheStatistics<K, V> {
	
	/**
	 * 
	 */
	void reset();
	
	/**
	 * 
	 */
	long getHitCount();
	
	BigDecimal getHitRatio();
	
	long addAndGetHitCount(long delta);
	
	/**
	 * 
	 */
	long getReadCount();
	
	long addAndGetReadCount(long delta);
	
	long getWriteCount();
	
	long addAndGetWriteCount(long delta);
	
	/**
	 * 
	 */
	long getLoadCount();
	
	long addAndGetLoadCount(long delta);
	
	long getVainlyLoadCount();
	
	long addAndGetVainlyLoadCount(long delta);
	
	long getUnsuccessfullyLoadCount();
	
	long addAndGetUnsuccessfullyLoadCount(long delta);
	
	double getAverageLoadTime();
	
	void sampleAverageLoadTime(long sample);
}
